<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
    'Login',
);
?>

<script type="text/javascript">
    $(document).ready(function() {
        $('#signin-container').submit(function() {
            document.location = 'dashboard.html';
            return false;
        });

        var updateBoxPosition = function() {
            $('#signin-container').css({
                'margin-top': ($(window).height() - $('#signin-container').height()) / 2
            });
        };
        $(window).resize(updateBoxPosition);
        setTimeout(updateBoxPosition, 50);
    });
</script>

<h1>Login</h1>

<p>Please fill out the following form with your login credentials:</p>


<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'login-form',
        'class' => 'signin-page',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    ?>

    <section id="signin-container">
        <a href="dashboard.html" title="AdminFlare" class="header">
            <img src="assets/images/af-logo-signin.png" alt="Sign in to Admin Flare">
            <span>
                Sign in to<br>
                <strong>AdminFlare</strong>
            </span>
        </a>
        <form action="dashboard.html" method="get" accept-charset="utf-8">
            <fieldset>
                <div class="fields">
                    <input type="text" name="username" placeholder="Username" id="id_username" tabindex="1">

                    <input type="password" name="password" placeholder="Password" id="id_password" tabindex="2">
                </div>
                <a href="#" title="" tabindex="3" class="forgot-password">Forgot?</a>

                <button type="submit" class="btn btn-primary btn-block" tabindex="4">Sign In</button>
            </fieldset>
        </form>
        <div class="social">
            <p>...or sign in with</p>

            <a href="dashboard.html" title="" tabindex="5" class="twitter">
                <i class="icon-twitter"></i>
            </a>

            <a href="dashboard.html" title="" tabindex="6" class="facebook">
                <i class="icon-facebook"></i>
            </a>

            <a href="dashboard.html" title="" tabindex="7" class="google">
                <i class="icon-google-plus"></i>
            </a>
        </div>
    </section>

<?php $this->endWidget(); ?>
</div><!-- form -->
